package com.example.drawex;

import android.app.Activity;
import android.content.Intent;
import android.view.MenuItem;



public class OptionMenu {

	Activity activity;

	public OptionMenu(Activity a, MenuItem item) {
		super();
		
		int id = item.getItemId();
    	Intent intent = null;
    	
    	switch(id) {
    	
    	case R.id.custom_view:
    		intent = new Intent(a, CustomViewActivity.class);
        	break;

    	case R.id.xmlview:
    		intent = new Intent(a, XMLViewActivity.class);
        	break;
        	
    	case R.id.draw_text:
    		intent = new Intent(a, DrawTextActivity.class);
        	break;
        	
    	case R.id.xmlimage:
    		intent = new Intent(a, XMLImageActivity.class);
        	break;
        	
    	case R.id.bitmap:
    		intent = new Intent(a, BitmapActivity.class);
        	break;
        	
    	case R.id.bitmap_scale:
    		intent = new Intent(a, BitmapScaleActivity.class);
        	break;
        	
    	case R.id.bitmap_matrix:
    		intent = new Intent(a, BitmapMatrixActivity.class);
        	break;
        
    	}
    	
    	a.startActivity(intent);
    	
		// this.activity = activity;
	}
}

